﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;
using GameSchool.Models;
using GameSchool.Models.Interfaces;


namespace GameSchoolTests
{
    class MockNewsRepository : INewsRepository
    {
        List<NewsItem> m_newsItems = new List<NewsItem>();

        public MockNewsRepository(int count)
        {
            for (int i = 0; i < count; i++)
            {
                m_newsItems.Add(new NewsItem { ID = i + 1, Title = "Frétt " + (i + 1), DatePub = DateTime.Now.AddDays(i), Content = "Nú er gaman" });
            } 
        }

        public IQueryable<GameSchool.Models.NewsItem> GetNews()
        {
            return m_newsItems.AsQueryable(); 
        }
        
        public GameSchool.Models.NewsItem GetNewsByID(int? nID)
        {
            throw new NotImplementedException();
        }

        public void AddNews(GameSchool.Models.NewsItem n)
        {
            throw new NotImplementedException();
        }

        public void DeleteNews(int? nID)
        {
            throw new NotImplementedException();
        }

        public void Save()
        {
            throw new NotImplementedException();
        }
    }
}
